﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

namespace SmsVotes.SmsVoting
{
    public class CommandControl : UserControl
    {
        protected const string COMMAND_VOTECREATE = "createvote";
        protected const string COMMAND_VOTEEDIT = "editvote";
        protected const string COMMAND_VOTEDELETE = "deletevote";

        protected const string COMMAND_QUESTIONCREATE = "createquestion";
        protected const string COMMAND_QUESTIONEDIT = "editquestion";
        protected const string COMMAND_QUESTIONDELETE = "deletequestion";

        protected const string COMMAND_ANSWEREDIT = "editanswer";
        protected const string COMMAND_ANSWERDELETE = "deleteanswer";


        protected string Command
        {
            get
            {
                string cmd = Request.QueryString["cmd"];
                if (string.IsNullOrEmpty(cmd))
                    throw new ArgumentException("Незадана команда");
                return cmd;
            }
        }
    }
}
